//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { ComponentSetting, ComponentSettingResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooComponentSettingList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<ComponentSettingResponse>(`/uctoo/component_setting/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooComponentSetting = async (id: string) => {
  return requestClient.get<ComponentSetting>(`/uctoo/component_setting/${id}`);
};

export const adductooComponentSetting = async (data: Partial<ComponentSetting>) => {
  return requestClient.post<ComponentSetting>('/uctoo/component_setting/add', data);
};

export const edituctooComponentSetting = async (data: Partial<ComponentSetting>) => {
  return requestClient.post<ComponentSetting>('/uctoo/component_setting/edit', data);
};

export const deleteuctooComponentSetting = async (id: string) => {
  return requestClient.post<any>('/uctoo/component_setting/del', { id });
};
